<!--
 * @Description: 编辑器
 * @Author: HuiSir<273250950@qq.com>
 * @Date: 2022-02-16 14:29:02
 * @LastEditTime: 2025-08-11 10:25:46
-->
<template>
  <div class="my-editor">
    <fy-rich-editor
      v-model="htmlVal"
      :uploadImageConfig="richEditorUploadImageConfigMixin"
    />
  </div>
  <fy-box-card title="HTML内容">
    {{ htmlVal }}
  </fy-box-card>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { richEditorUploadImageConfigMixin } from "@/helpers/optionsMixin";

// 组件名称（必要）
defineOptions({ name: "FyEditor" });

const htmlVal = ref("");
</script>

<style scoped lang="scss">
.my-editor {
  padding: 20px;
  width: 100%;
  // height: 500px;
  background: #fff;
  border-radius: 4px;
  margin-bottom: 10px;
}
::v-deep(.el-card__body) {
  word-break: break-all;
}
</style>
